package com.jack.xiaoer.constant;

/**
 * Created by Jackaroo Zhang on 2018/12/14.
 */
public enum OrderStateEnum {

    NO_PAY(0), PAY(5), WAIT(10), FINISH(20);
    private Integer code;

    OrderStateEnum(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return this.code;
    }

    public static boolean valid(Integer code) {
        for (OrderStateEnum item : OrderStateEnum.values()) {
            if (item.code.equals(code))
                return true;
        }
        return false;
    }

}
